package com.oceansoft.core.jxkh.service.impl;

import com.hui.platform.system.exception.HuiException;
import com.oceansoft.core.common.util.Pagination;
import com.oceansoft.core.domain.SysUser;
import com.oceansoft.core.jxkh.dao.IEvaluationDao;
import com.oceansoft.core.jxkh.domain.Evaluation;
import com.oceansoft.core.jxkh.domain.MyMark;
import com.oceansoft.core.jxkh.service.IEvaluationService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2017/10/24.
 */
@Service
public class EvaluationServiceImpl implements IEvaluationService {

    @Resource
    private IEvaluationDao evaluationDao;
    @Override
    public List<Map<String, Object>> getStatisticsDept(String deptId)throws  HuiException{
        return evaluationDao.getStatisticsDept(deptId);
    }

    @Override
    public List<Map<String, Object>> getStatisticsUser(String deptId)throws HuiException {
        return evaluationDao.getStatisticsUser(deptId);
    }

    @Override
    public Pagination<MyMark> myEvaluation(HashMap<Object,Object> map) throws HuiException{
        return evaluationDao.myEvaluation(map);
    }

    @Override
    public MyMark findMonthZpByDbid(int dbid) throws HuiException {
        return evaluationDao.findMonthZpByDbid(dbid);
    }

    @Override
    public void editMonthZp(MyMark myMark) throws HuiException {
        evaluationDao.editMonthZp(myMark);
    }

    @Override
    public void selfEvaluation(Evaluation evaluation) throws HuiException{
        evaluationDao.selfEvaluation(evaluation);
    }

    @Override
    public void leaderEvaluation(Evaluation evaluation) throws HuiException {
        evaluationDao.leaderEvaluation(evaluation);
    }

    @Override
    public List<Evaluation> leaderElist(HashMap<String, String> map, SysUser user)throws Exception {
        return evaluationDao.leaderElist(map,user);
    }

    @Override
    public void leaderConfirm(String dbid)throws HuiException {
        evaluationDao.leaderConfirm(dbid);
    }

    @Override
    public Evaluation findEvaluation(int dbid) {
        return evaluationDao.findEvaluation(dbid);
    }
}
